﻿using System.Security.Principal;

namespace viBook.Models
{
    public class ExtendedIdentity : IIdentity
    {
        public ExtendedIdentity(User user)
        {
            if (user != null)
            {
                Id = user.Id;
                Name = user.Username;
            }
        }

        public string Name { get; private set; }

        public string AuthenticationType
        {
            get { return "Extended"; }
        }

        public bool IsAuthenticated
        {
            get { return !string.IsNullOrEmpty(Name); }
        }

        public int Id { get; private set; }

    }
}